package com.superhelper.common.domain;

import java.util.Date;

/**
 * 任务表
 * 
 */
public class Task {
    private Long id;
    private String type;
    private String objId;
    private Integer flag;
    private Date nextTime;
    private Integer retryTimes;
    private Date createTime;

    /**
     * 
     */
    public Task() {
    }

    /**
     * @param type
     * @param objId
     */
    public Task(String type, String objId) {
        this.type = type;
        this.objId = objId;
        this.flag = 0;
        this.nextTime = new Date();
        this.createTime = this.nextTime;
        this.retryTimes = 0;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getObjId() {
        return this.objId;
    }

    public void setObjId(String objId) {
        this.objId = objId;
    }

    public Integer getFlag() {
        return this.flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public Date getNextTime() {
        return this.nextTime;
    }

    public void setNextTime(Date nextTime) {
        this.nextTime = nextTime;
    }

    public Integer getRetryTimes() {
        return this.retryTimes;
    }

    public void setRetryTimes(Integer retryTimes) {
        this.retryTimes = retryTimes;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Task [id=" + this.id + ", type=" + this.type + ", objId=" + this.objId + ", flag=" + this.flag
                + ", nextTime=" + this.nextTime + ", retryTimes=" + this.retryTimes + ", createTime=" + this.createTime
                + "]";
    }
}
